.class public Les/dz;
.super Les/ny;
.source "MusicEditMenuProvider.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/dz$l;
    }
.end annotation


# instance fields
.field private c:[Ljava/lang/String;

.field private d:[Ljava/lang/String;

.field private e:[Ljava/lang/String;

.field private f:[Ljava/lang/String;

.field private g:[Ljava/lang/String;

.field private h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

.field private i:I


# direct methods
.method public constructor <init>(Lcom/estrongs/android/pop/app/PopAudioPlayer;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Les/ny;-><init>()V

    const/4 v0, -0x1

    .line 2
    iput v0, p0, Les/dz;->i:I

    .line 3
    iput-object p1, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    return-void
.end method

.method private static a(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;Ljava/lang/String;IJ)Landroid/net/Uri;
    .locals 3

    const-string v0, "."

    .line 42
    invoke-virtual {p1, v0}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v0

    const/4 v1, 0x0

    const/4 v2, -0x1

    if-ne v0, v2, :cond_0

    goto :goto_0

    .line 43
    :cond_0
    invoke-virtual {p1, v1, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p1

    .line 44
    :goto_0
    invoke-static {p2}, Lcom/estrongs/android/util/h0;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    .line 45
    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    const-string v2, "_data"

    .line 46
    invoke-virtual {v0, v2, p2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    const-string p2, "title"

    .line 47
    invoke-virtual {v0, p2, p1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 48
    invoke-static {p4, p5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p1

    const-string p2, "_size"

    invoke-virtual {v0, p2, p1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    const-string p1, "mime_type"

    const-string p2, "audio/*"

    .line 49
    invoke-virtual {v0, p1, p2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    const/4 p1, 0x1

    if-ne p3, p1, :cond_1

    const/4 p2, 0x1

    goto :goto_1

    :cond_1
    const/4 p2, 0x0

    .line 50
    :goto_1
    invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p2

    const-string p4, "is_ringtone"

    invoke-virtual {v0, p4, p2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V

    const/4 p2, 0x2

    if-ne p3, p2, :cond_2

    const/4 p2, 0x1

    goto :goto_2

    :cond_2
    const/4 p2, 0x0

    .line 51
    :goto_2
    invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p2

    const-string p4, "is_notification"

    invoke-virtual {v0, p4, p2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V

    const/4 p2, 0x4

    if-ne p3, p2, :cond_3

    const/4 v1, 0x1

    .line 52
    :cond_3
    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p2

    const-string p3, "is_alarm"

    invoke-virtual {v0, p3, p2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V

    .line 53
    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1

    const-string p2, "is_music"

    invoke-virtual {v0, p2, p1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V

    .line 54
    sget-object p1, Landroid/provider/MediaStore$Audio$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    .line 55
    :try_start_0
    invoke-virtual {p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object p0

    invoke-virtual {p0, p1, v0}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    move-result-object p0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p0

    :catch_0
    move-exception p0

    .line 56
    invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V

    const/4 p0, 0x0

    return-object p0
.end method

.method static synthetic a(Les/dz;)Lcom/estrongs/android/pop/app/PopAudioPlayer;
    .locals 0

    .line 1
    iget-object p0, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    return-object p0
.end method

.method private static a(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;I)Ljava/lang/String;
    .locals 16
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "NewApi"
        }
    .end annotation

    move/from16 v0, p2

    const-string v1, "/"

    const-string v2, "external"

    const-string v3, "_id"

    .line 21
    invoke-static/range {p1 .. p1}, Lcom/estrongs/android/util/h0;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x2

    const/4 v6, 0x1

    if-ne v0, v6, :cond_0

    const-string v0, "is_ringtone"

    goto :goto_0

    :cond_0
    if-ne v0, v5, :cond_1

    const-string v0, "is_notification"

    goto :goto_0

    :cond_1
    const-string v0, "is_alarm"

    .line 22
    :goto_0
    sget-object v7, Landroid/provider/MediaStore$Audio$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    invoke-virtual {v7}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v7

    const/4 v8, 0x0

    .line 23
    :try_start_0
    invoke-virtual/range {p0 .. p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v9

    sget-object v10, Landroid/provider/MediaStore$Audio$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    new-array v11, v5, [Ljava/lang/String;

    const/4 v5, 0x0

    aput-object v3, v11, v5

    aput-object v0, v11, v6

    const-string v12, "_data=?"

    new-array v13, v6, [Ljava/lang/String;

    aput-object v4, v13, v5

    const/4 v14, 0x0

    invoke-virtual/range {v9 .. v14}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v9
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_2
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    if-eqz v9, :cond_5

    .line 24
    :try_start_1
    invoke-interface {v9}, Landroid/database/Cursor;->getCount()I

    move-result v10

    if-nez v10, :cond_2

    goto :goto_2

    .line 25
    :cond_2
    invoke-interface {v9}, Landroid/database/Cursor;->moveToFirst()Z

    .line 26
    invoke-interface {v9, v5}, Landroid/database/Cursor;->getInt(I)I

    move-result v2

    .line 27
    invoke-interface {v9, v6}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    .line 28
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    if-nez v3, :cond_3

    .line 29
    new-instance v3, Landroid/content/ContentValues;

    invoke-direct {v3}, Landroid/content/ContentValues;-><init>()V

    .line 30
    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v4

    invoke-virtual {v3, v0, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 31
    :try_start_2
    invoke-virtual/range {p0 .. p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    sget-object v4, Landroid/provider/MediaStore$Audio$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "_id="

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v4, v3, v5, v8}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_1

    :catch_0
    move-exception v0

    .line 32
    :try_start_3
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 33
    :cond_3
    :goto_1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    if-eqz v9, :cond_4

    .line 34
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    :cond_4
    return-object v0

    :catchall_0
    move-exception v0

    move-object v8, v9

    goto :goto_4

    :catch_1
    nop

    goto :goto_5

    :cond_5
    :goto_2
    if-eqz v9, :cond_6

    .line 35
    :try_start_4
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 36
    :cond_6
    invoke-virtual/range {p0 .. p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v10

    invoke-static {v2}, Landroid/provider/MediaStore$Files;->getContentUri(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v11

    new-array v12, v6, [Ljava/lang/String;

    aput-object v3, v12, v5

    const-string v13, "_data=?"

    new-array v14, v6, [Ljava/lang/String;

    aput-object v4, v14, v5

    const/4 v15, 0x0

    invoke-virtual/range {v10 .. v15}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v9

    if-eqz v9, :cond_9

    .line 37
    invoke-interface {v9}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-nez v0, :cond_7

    goto :goto_3

    .line 38
    :cond_7
    invoke-virtual/range {p0 .. p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-static {v2}, Landroid/provider/MediaStore$Files;->getContentUri(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    const-string v2, "_data=?"

    new-array v3, v6, [Ljava/lang/String;

    aput-object v4, v3, v5

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_1
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    if-eqz v9, :cond_8

    .line 39
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    :cond_8
    return-object v8

    :cond_9
    :goto_3
    if-eqz v9, :cond_a

    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    :cond_a
    return-object v8

    :catchall_1
    move-exception v0

    :goto_4
    if-eqz v8, :cond_b

    invoke-interface {v8}, Landroid/database/Cursor;->close()V

    .line 40
    :cond_b
    throw v0

    :catch_2
    move-object v9, v8

    :goto_5
    if-eqz v9, :cond_c

    .line 41
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    :cond_c
    return-object v8
.end method

.method public static a(Lcom/estrongs/android/pop/app/PopAudioPlayer;)V
    .locals 1

    .line 59
    new-instance v0, Les/dz$l;

    invoke-direct {v0, p0}, Les/dz$l;-><init>(Lcom/estrongs/android/pop/app/PopAudioPlayer;)V

    .line 60
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q;->show()V

    return-void
.end method

.method public static a(Lcom/estrongs/android/pop/app/PopAudioPlayer;Lcom/estrongs/fs/g;)V
    .locals 1

    if-nez p1, :cond_0

    const p1, 0x7f110027

    const/4 v0, 0x1

    .line 57
    invoke-static {p0, p1, v0}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    goto :goto_0

    .line 58
    :cond_0
    new-instance v0, Lcom/estrongs/android/ui/dialog/s0;

    invoke-direct {v0, p0, p1}, Lcom/estrongs/android/ui/dialog/s0;-><init>(Landroid/app/Activity;Lcom/estrongs/fs/g;)V

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/s0;->a()V

    :goto_0
    return-void
.end method

.method public static b(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;I)Z
    .locals 10

    .line 1
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->U1(Ljava/lang/String;)Z

    move-result v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_8

    if-ne p2, v1, :cond_0

    .line 2
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/estrongs/android/pop/c;->b()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "/media/ringtones"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_0
    const/4 v0, 0x2

    if-ne p2, v0, :cond_1

    .line 3
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/estrongs/android/pop/c;->b()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "/media/notifications"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_1
    const/4 v0, 0x4

    if-ne p2, v0, :cond_7

    .line 4
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/estrongs/android/pop/c;->b()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "/media/alarms"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 5
    :goto_0
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 6
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v4

    if-nez v4, :cond_2

    .line 7
    invoke-virtual {v3}, Ljava/io/File;->mkdirs()Z

    move-result v3

    if-nez v3, :cond_2

    const-string p0, "ES"

    const-string p1, "can\'t create ringtone folder"

    .line 8
    invoke-static {p0, p1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    return v2

    .line 9
    :cond_2
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->y(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 10
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "/"

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    .line 11
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 12
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v3

    if-nez v3, :cond_4

    .line 13
    new-instance v3, Les/z60;

    invoke-static {p0}, Lcom/estrongs/fs/f;->a(Landroid/content/Context;)Lcom/estrongs/fs/f;

    move-result-object v6

    .line 14
    invoke-static {p0}, Lcom/estrongs/fs/f;->a(Landroid/content/Context;)Lcom/estrongs/fs/f;

    move-result-object v7

    invoke-virtual {v7, p1}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object p1

    new-instance v7, Lcom/estrongs/fs/impl/local/d;

    new-instance v8, Ljava/io/File;

    invoke-direct {v8, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v7, v8}, Lcom/estrongs/fs/impl/local/d;-><init>(Ljava/io/File;)V

    invoke-direct {v3, v6, p1, v7}, Les/z60;-><init>(Lcom/estrongs/fs/f;Lcom/estrongs/fs/g;Lcom/estrongs/fs/g;)V

    .line 15
    invoke-virtual {v3, v2}, Les/s80;->b(Z)V

    .line 16
    invoke-virtual {v3}, Les/s80;->l()Les/u80;

    move-result-object p1

    iget p1, p1, Les/u80;->a:I

    if-eqz p1, :cond_3

    return v2

    :cond_3
    const/4 p1, 0x0

    goto :goto_1

    :cond_4
    const/4 p1, 0x1

    :goto_1
    const/4 v3, 0x0

    if-eqz p1, :cond_5

    .line 17
    invoke-static {p0, v5, p2}, Les/dz;->a(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v3

    :cond_5
    if-nez v3, :cond_6

    .line 18
    invoke-virtual {v0}, Ljava/io/File;->length()J

    move-result-wide v7

    move-object v3, p0

    move v6, p2

    invoke-static/range {v3 .. v8}, Les/dz;->a(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;Ljava/lang/String;IJ)Landroid/net/Uri;

    move-result-object p1

    goto :goto_2

    .line 19
    :cond_6
    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    goto :goto_2

    :cond_7
    return v2

    .line 20
    :cond_8
    invoke-static {p0, p1, p2}, Les/dz;->a(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    .line 21
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    if-nez v0, :cond_9

    .line 22
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->y(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 23
    invoke-virtual {v3}, Ljava/io/File;->length()J

    move-result-wide v8

    move-object v4, p0

    move-object v6, p1

    move v7, p2

    .line 24
    invoke-static/range {v4 .. v9}, Les/dz;->a(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;Ljava/lang/String;IJ)Landroid/net/Uri;

    move-result-object p1

    goto :goto_2

    .line 25
    :cond_9
    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    :goto_2
    if-nez p1, :cond_a

    return v2

    .line 26
    :cond_a
    invoke-static {p0}, Lcom/permission/runtime/f;->c(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_b

    .line 27
    invoke-static {p0, p2, p1}, Landroid/media/RingtoneManager;->setActualDefaultRingtoneUri(Landroid/content/Context;ILandroid/net/Uri;)V

    const p1, 0x7f110ab0

    .line 28
    invoke-virtual {p0, p1}, Landroid/app/Activity;->getText(I)Ljava/lang/CharSequence;

    move-result-object p0

    invoke-static {p0}, Lcom/estrongs/android/ui/view/d;->a(Ljava/lang/CharSequence;)V

    return v1

    .line 29
    :cond_b
    invoke-static {p0}, Lcom/permission/runtime/e$a;->a(Landroid/content/Context;)Lcom/permission/runtime/e$a;

    move-result-object v0

    const-string v2, "android.permission.WRITE_SETTINGS"

    .line 30
    invoke-virtual {v0, v2}, Lcom/permission/runtime/e$a;->a(Ljava/lang/String;)Lcom/permission/runtime/e$a;

    new-instance v2, Les/dz$b;

    invoke-direct {v2, p0, p2, p1}, Les/dz$b;-><init>(Lcom/estrongs/android/pop/app/PopAudioPlayer;ILandroid/net/Uri;)V

    .line 31
    invoke-virtual {v0, v2}, Lcom/permission/runtime/e$a;->a(Lcom/permission/runtime/c;)V

    return v1
.end method

.method public static c(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;I)V
    .locals 1

    .line 1
    new-instance v0, Les/dz$a;

    invoke-direct {v0, p0, p1, p2}, Les/dz$a;-><init>(Lcom/estrongs/android/pop/app/PopAudioPlayer;Ljava/lang/String;I)V

    .line 2
    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 4

    .line 2
    iput p1, p0, Les/dz;->i:I

    .line 3
    iget-object p1, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/PopAudioPlayer;->S()Les/to;

    move-result-object p1

    invoke-static {}, Les/wo;->j()Les/wo;

    move-result-object v0

    invoke-virtual {v0}, Les/wo;->a()Les/to;

    move-result-object v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-ne p1, v0, :cond_0

    const/4 p1, 0x1

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    .line 4
    :goto_0
    iget v0, p0, Les/dz;->i:I

    if-eq v0, v1, :cond_a

    const/4 v3, 0x2

    if-eq v0, v3, :cond_3

    const/4 v1, 0x3

    if-eq v0, v1, :cond_1

    goto/16 :goto_4

    :cond_1
    if-eqz p1, :cond_2

    .line 5
    iget-object p1, p0, Les/dz;->d:[Ljava/lang/String;

    goto :goto_1

    :cond_2
    iget-object p1, p0, Les/dz;->f:[Ljava/lang/String;

    :goto_1
    iput-object p1, p0, Les/ny;->b:[Ljava/lang/String;

    goto/16 :goto_4

    .line 6
    :cond_3
    iget-object v0, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/PopAudioPlayer;->T()Ljava/util/List;

    move-result-object v0

    .line 7
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v3

    if-lez v3, :cond_b

    .line 8
    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Les/so;

    iget-object v0, v0, Les/so;->b:Ljava/lang/String;

    .line 9
    invoke-static {v0}, Lcom/estrongs/android/util/h0;->a1(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_4

    .line 10
    invoke-static {v0}, Lcom/estrongs/android/util/h0;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :cond_4
    if-nez v0, :cond_5

    return-void

    :cond_5
    if-eqz p1, :cond_6

    .line 11
    iget-object p1, p0, Les/dz;->c:[Ljava/lang/String;

    goto :goto_2

    :cond_6
    iget-object p1, p0, Les/dz;->e:[Ljava/lang/String;

    .line 12
    :goto_2
    invoke-static {v0}, Lcom/estrongs/android/util/h0;->M1(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_7

    iget-object v3, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    invoke-static {v3}, Lcom/estrongs/android/ui/pcs/j;->a(Landroid/content/Context;)Z

    move-result v3

    if-eqz v3, :cond_7

    .line 13
    iget-object p1, p0, Les/dz;->c:[Ljava/lang/String;

    const-string v3, "backup_pcs"

    invoke-virtual {p0, p1, v3}, Les/ny;->a([Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;

    move-result-object p1

    :cond_7
    const-string v3, "http://"

    .line 14
    invoke-virtual {v0, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_8

    const-string v3, "http://127.0.0.1:"

    .line 15
    invoke-virtual {v0, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_8

    const/4 v3, 0x0

    goto :goto_3

    :cond_8
    const/4 v3, 0x1

    :goto_3
    if-nez v3, :cond_9

    const-string v3, "delete"

    .line 16
    invoke-virtual {p0, p1, v3}, Les/ny;->a([Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;

    move-result-object p1

    .line 17
    :cond_9
    iput-object p1, p0, Les/ny;->b:[Ljava/lang/String;

    .line 18
    invoke-static {v0}, Lcom/estrongs/android/util/h0;->y1(Ljava/lang/String;)Z

    move-result p1

    if-nez p1, :cond_b

    new-array p1, v1, [Ljava/lang/String;

    const-string v0, "ringtone"

    aput-object v0, p1, v2

    .line 19
    invoke-virtual {p0, p1}, Les/ny;->b([Ljava/lang/String;)V

    goto :goto_4

    .line 20
    :cond_a
    iget-object p1, p0, Les/dz;->g:[Ljava/lang/String;

    iput-object p1, p0, Les/ny;->b:[Ljava/lang/String;

    :cond_b
    :goto_4
    return-void
.end method

.method public d()V
    .locals 12

    .line 1
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Les/ny;->a:Ljava/util/Map;

    .line 2
    new-instance v0, Les/v00;

    iget-object v1, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v2, 0x7f11005c

    invoke-virtual {v1, v2}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v1

    const v2, 0x7f0809bc

    invoke-direct {v0, v2, v1}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v1, Les/dz$c;

    invoke-direct {v1, p0}, Les/dz$c;-><init>(Les/dz;)V

    .line 3
    invoke-virtual {v0, v1}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    .line 4
    new-instance v1, Les/v00;

    iget-object v2, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v3, 0x7f110161

    invoke-virtual {v2, v3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v2

    const v3, 0x7f0809bf

    invoke-direct {v1, v3, v2}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v2, Les/dz$d;

    invoke-direct {v2, p0}, Les/dz$d;-><init>(Les/dz;)V

    .line 5
    invoke-virtual {v1, v2}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    .line 6
    new-instance v2, Les/v00;

    iget-object v3, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v4, 0x7f11003f

    .line 7
    invoke-virtual {v3, v4}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v3

    const v4, 0x7f08098e

    invoke-direct {v2, v4, v3}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v3, Les/dz$e;

    invoke-direct {v3, p0}, Les/dz$e;-><init>(Les/dz;)V

    invoke-virtual {v2, v3}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    .line 8
    new-instance v3, Les/v00;

    iget-object v5, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v6, 0x7f110abf

    .line 9
    invoke-virtual {v5, v6}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v3, v4, v5}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v4, Les/dz$f;

    invoke-direct {v4, p0}, Les/dz$f;-><init>(Les/dz;)V

    .line 10
    invoke-virtual {v3, v4}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    .line 11
    new-instance v4, Les/v00;

    iget-object v5, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v6, 0x7f110654

    .line 12
    invoke-virtual {v5, v6}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v5

    const v6, 0x7f0809ad

    invoke-direct {v4, v6, v5}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v5, Les/dz$g;

    invoke-direct {v5, p0}, Les/dz$g;-><init>(Les/dz;)V

    .line 13
    invoke-virtual {v4, v5}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    .line 14
    new-instance v5, Les/v00;

    iget-object v6, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v7, 0x7f110071

    .line 15
    invoke-virtual {v6, v7}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v6

    const v7, 0x7f0809d9

    invoke-direct {v5, v7, v6}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v6, Les/dz$h;

    invoke-direct {v6, p0}, Les/dz$h;-><init>(Les/dz;)V

    invoke-virtual {v5, v6}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    .line 16
    new-instance v6, Les/v00;

    iget-object v7, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v8, 0x7f1102a7

    .line 17
    invoke-virtual {v7, v8}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v7

    const v8, 0x7f0809c4

    invoke-direct {v6, v8, v7}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v7, Les/dz$i;

    invoke-direct {v7, p0}, Les/dz$i;-><init>(Les/dz;)V

    invoke-virtual {v6, v7}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    .line 18
    iget-object v7, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    invoke-static {v7}, Lcom/estrongs/android/ui/pcs/j;->a(Landroid/content/Context;)Z

    move-result v7

    if-eqz v7, :cond_0

    .line 19
    new-instance v7, Les/v00;

    const v8, 0x7f080977

    iget-object v9, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v10, 0x7f1103ec

    .line 20
    invoke-virtual {v9, v10}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v7, v8, v9}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v8, Les/dz$j;

    invoke-direct {v8, p0}, Les/dz$j;-><init>(Les/dz;)V

    .line 21
    invoke-virtual {v7, v8}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    goto :goto_0

    :cond_0
    const/4 v7, 0x0

    .line 22
    :goto_0
    new-instance v8, Les/v00;

    const v9, 0x7f080a01

    iget-object v10, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    const v11, 0x7f110b5e

    invoke-virtual {v10, v11}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v10

    invoke-direct {v8, v9, v10}, Les/v00;-><init>(ILjava/lang/String;)V

    new-instance v9, Les/dz$k;

    invoke-direct {v9, p0}, Les/dz$k;-><init>(Les/dz;)V

    .line 23
    invoke-virtual {v8, v9}, Les/v00;->setOnMenuItemClickListener(Landroid/view/MenuItem$OnMenuItemClickListener;)Les/v00;

    .line 24
    iget-object v9, p0, Les/ny;->a:Ljava/util/Map;

    const-string v10, "play"

    invoke-interface {v9, v10, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 25
    iget-object v0, p0, Les/ny;->a:Ljava/util/Map;

    const-string v9, "add_to"

    invoke-interface {v0, v9, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 26
    iget-object v0, p0, Les/ny;->a:Ljava/util/Map;

    const-string v1, "moveout"

    invoke-interface {v0, v1, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 27
    iget-object v0, p0, Les/ny;->a:Ljava/util/Map;

    const-string v1, "ringtone"

    invoke-interface {v0, v1, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 28
    iget-object v0, p0, Les/ny;->a:Ljava/util/Map;

    const-string v1, "share"

    invoke-interface {v0, v1, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 29
    iget-object v0, p0, Les/ny;->a:Ljava/util/Map;

    const-string v1, "property"

    invoke-interface {v0, v1, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 30
    iget-object v0, p0, Les/ny;->a:Ljava/util/Map;

    const-string v1, "delete"

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 31
    iget-object v0, p0, Les/ny;->a:Ljava/util/Map;

    const-string v1, "search"

    invoke-interface {v0, v1, v8}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 32
    iget-object v0, p0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    invoke-static {v0}, Lcom/estrongs/android/ui/pcs/j;->a(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 33
    iget-object v0, p0, Les/ny;->a:Ljava/util/Map;

    const-string v1, "backup_pcs"

    invoke-interface {v0, v1, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_1
    return-void
.end method

.method public e()V
    .locals 18

    move-object/from16 v0, p0

    const/16 v1, 0x8

    new-array v2, v1, [Ljava/lang/String;

    const-string v3, "play"

    const/4 v4, 0x0

    aput-object v3, v2, v4

    const-string v5, "add_to"

    const/4 v6, 0x1

    aput-object v5, v2, v6

    const-string v7, "ringtone"

    const/4 v8, 0x2

    aput-object v7, v2, v8

    const-string v9, "share"

    const/4 v10, 0x3

    aput-object v9, v2, v10

    const-string v11, "property"

    const/4 v12, 0x4

    aput-object v11, v2, v12

    const-string v13, "delete"

    const/4 v14, 0x5

    aput-object v13, v2, v14

    const/4 v15, 0x6

    const-string v14, "backup_pcs"

    aput-object v14, v2, v15

    const/16 v16, 0x7

    const-string v17, "search"

    aput-object v17, v2, v16

    .line 1
    iput-object v2, v0, Les/dz;->c:[Ljava/lang/String;

    new-array v2, v10, [Ljava/lang/String;

    aput-object v3, v2, v4

    aput-object v5, v2, v6

    aput-object v17, v2, v8

    .line 2
    iput-object v2, v0, Les/dz;->d:[Ljava/lang/String;

    new-array v2, v1, [Ljava/lang/String;

    aput-object v3, v2, v4

    aput-object v5, v2, v6

    aput-object v7, v2, v8

    aput-object v9, v2, v10

    aput-object v11, v2, v12

    const/4 v5, 0x5

    aput-object v13, v2, v5

    aput-object v14, v2, v15

    aput-object v17, v2, v16

    .line 3
    iput-object v2, v0, Les/dz;->g:[Ljava/lang/String;

    new-array v1, v1, [Ljava/lang/String;

    aput-object v3, v1, v4

    const-string v2, "moveout"

    aput-object v2, v1, v6

    aput-object v7, v1, v8

    aput-object v9, v1, v10

    aput-object v11, v1, v12

    aput-object v13, v1, v5

    aput-object v14, v1, v15

    aput-object v17, v1, v16

    .line 4
    iput-object v1, v0, Les/dz;->e:[Ljava/lang/String;

    new-array v1, v10, [Ljava/lang/String;

    aput-object v3, v1, v4

    aput-object v2, v1, v6

    aput-object v17, v1, v8

    .line 5
    iput-object v1, v0, Les/dz;->f:[Ljava/lang/String;

    .line 6
    iget-object v1, v0, Les/dz;->h:Lcom/estrongs/android/pop/app/PopAudioPlayer;

    invoke-static {v1}, Lcom/estrongs/android/ui/pcs/j;->a(Landroid/content/Context;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 7
    iget-object v1, v0, Les/dz;->c:[Ljava/lang/String;

    invoke-virtual {v0, v1, v14}, Les/ny;->a([Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Les/dz;->c:[Ljava/lang/String;

    .line 8
    iget-object v1, v0, Les/dz;->e:[Ljava/lang/String;

    invoke-virtual {v0, v1, v14}, Les/ny;->a([Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Les/dz;->e:[Ljava/lang/String;

    .line 9
    iget-object v1, v0, Les/dz;->g:[Ljava/lang/String;

    invoke-virtual {v0, v1, v14}, Les/ny;->a([Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Les/dz;->g:[Ljava/lang/String;

    :cond_0
    return-void
.end method
